package top.lishuoboy.ssm.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import top.lishuoboy.ssm.WebAppConfig;

// 只扫描 @Controller 注解
@ComponentScan(basePackageClasses = WebAppConfig.class, includeFilters = {@ComponentScan.Filter(
    type = FilterType.ANNOTATION, classes = {org.springframework.stereotype.Controller.class})}
    , useDefaultFilters = false  // 禁用默认过滤器，因为它会扫描 @Component @Repository, @Service, or @Controller
)
//@Configuration  // 非必需
//@EnableWebMvc   // 非必需
public class SpringMvcConfig {
}